<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>树人100-微信UI-1.0</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <style>
        .text{padding-left:9px; }
        .weui-media-box__title{font-size:15px;}
        .weui-media-box__thumb{width:45px;height:45px;border-radius: 23.5px;border:1px #ccc solid;}
        .weui-media-box_appmsg .weui-media-box__thumb{width:45px;height:45px;border-radius: 23.5px;border:1px #ccc solid;}
    </style>
</head>
<body>

<div class="container" id="container">

    <!--顶部搜索-->
    <div class="page home js_show">

        <div class="page__bd" style="height: 100%;">
            <!--选择导航-->



            <div class="weui-tab__panel">

                <div class="weui-panel articlelist">


                    <div class="page__bd">
                        <div class="weui-panel weui-panel_access">
                            <div class="weui-panel__hd" style="font-size:16px;color:#000;text-align:center;height:32px;"><b>我关注的</b></div>
                            <div class="weui-panel__bd">
                                <div id="myarticle"></div>
                            </div>
                        </div>
                    </div>


                </div>



            </div>
        </div>

    </div>
</div>
<div class="weui-tabbar footer" >
    <a href="javascript:;" class="weui-tabbar__item weui-bar__item_on">
                    <span style="display: inline-block;position: relative;">
                        <i class="fa fa-home weui-tabbar__icon"></i>
                    </span>
        <p class="weui-tabbar__label">首页</p>
    </a>
    <a href="javascript:;" class="weui-tabbar__item">
                    <span style="display: inline-block;position: relative;">
                        <i class="fa fa-comments weui-tabbar__icon"></i>
                        <span class="weui-badge weui-badge_dot" style="position: absolute;top: 0;right: -6px;"></span>
                    </span>
        <p class="weui-tabbar__label">动态</p>
    </a>
    <a href="{:url('usercenter/index')}" class="weui-tabbar__item">
                    <span style="display: inline-block;position: relative;">
                        <i class="fa fa-user weui-tabbar__icon"></i>
                            <span class="weui-badge" style="position: absolute;top: -2px;right: -6px;">8</span>
                    </span>
        <p class="weui-tabbar__label">我的</p>

    </a>
</div>
</div>
</body>

<script type="text/javascript">
    now =1 ;
    AjaxPage();

    $(window).scroll(
            function() {
                var scrollTop = $(this).scrollTop();
                var scrollHeight = $(document).height();
                var windowHeight = $(this).height();
                if (scrollTop + windowHeight == scrollHeight) {
                    AjaxPage();
                }
            });


    function AjaxPage(){

        $.post('{:url("Usercenter/myfocus")}',
                {page:now},
                function(data){
                    if(data.code==1) {
                        $html = '';
                        for(c in data.list){
                            //data.list[c].addtime
                            qq= data.list[c].desc;
                            if(qq== null){
                                qq = '';
                            }
                            var urls = "<a href='/index/user/user_info/user_id/"+data.list[c].id+".html'  class='weui-media-box weui-media-box_appmsg'>";
                            $html = $html + urls +
                                    "<div class='weui-media-box__hd'>" +
                                    "<img class='weui-media-box__thumb' src='/uploads/face/"+data.list[c].head_img+"'  width='45px' height='45px' alt=''>" +
                                    "</div><div class='weui-media-box__bd'><h4 class='weui-media-box__title'>"+data.list[c].nickname+"</h4>" +
                                    "<p class='weui-media-box__desc' >"+qq+"</p></div></a>";
                        }
                        $("#myarticle").append($html);
                    }
                });

        now++;
    }

    //底部导航
    $(function(){
        $('.weui-tabbar__item').on('click', function () {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
        });
    });


</script>

</html>